package com.bcxj.servicemap.controller;

import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.internalcommon.entity.DicDistrict;
import com.bcxj.servicemap.mapper.DicDistrictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * ClassName: TestController
 * Package: com.bcxj.servicemap.controller
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/10/5 15:17
 * @Version 1.0
 * @Since 1.0
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private DicDistrictMapper dicDistrictMapper;

    @GetMapping
    public String test() {
        return "test";
    }


    @GetMapping("/test2")
    public ResponseResult test2() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("address_code", "1123");
        List<DicDistrict> dicDistricts = dicDistrictMapper.selectByMap(map);
        return ResponseResult.success(dicDistricts);
    }
}
